package com.jt.demo10.controller;

import com.jt.demo10.pojo.User;
import com.jt.demo10.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserController {
    @Autowired
    private UserService userService;
    public void addUser(){
        User user =new User();
        user.setName("新年好");
        userService.addUser(user);
    }
}
